package com.pingtai.manage.action;

import com.pingtai.user.service.UserManagerService;
import com.pingtai.util.PaginationSupport;

public class UserAction {

	private UserManagerService userManagerService;
	private Integer currentPage;
	private Integer pageNum;
	private PaginationSupport paginationSupport;
	
	
	public UserManagerService getUserManagerService() {
		return userManagerService;
	}

	public void setUserManagerService(UserManagerService userManagerService) {
		this.userManagerService = userManagerService;
	}

	public Integer getCurrentPage() {
		return currentPage;
	}

	public void setCurrentPage(Integer currentPage) {
		this.currentPage = currentPage;
	}

	public Integer getPageNum() {
		return pageNum;
	}

	public void setPageNum(Integer pageNum) {
		this.pageNum = pageNum;
	}

	public PaginationSupport getPaginationSupport() {
		return paginationSupport;
	}

	public void setPaginationSupport(PaginationSupport paginationSupport) {
		this.paginationSupport = paginationSupport;
	}

	public String userManageUI(){
		if(currentPage>0) {
			pageNum = currentPage;
			currentPage = PaginationSupport.PAGESIZE*(currentPage-1);
		}
		
	    paginationSupport = userManagerService.getChildrenUsersForPage(currentPage);
		return "success";
	}
}
